Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More ā†’
Socket
Sign inDemoInstall
Socket

@typescript-eslint/eslint-plugin

Package Overview
Dependencies
Maintainers
2
Versions
3910
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript-eslint/eslint-plugin

TypeScript plugin for ESLint

  • 5.62.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created

What is @typescript-eslint/eslint-plugin?

The @typescript-eslint/eslint-plugin package is an ESLint plugin that contains a set of ESLint rules that are specifically designed for TypeScript code. It helps in identifying and reporting on patterns found in TypeScript code, and it can be used to enforce a wide range of coding standards and conventions.

What are @typescript-eslint/eslint-plugin's main functionalities?

Type-aware linting

This feature allows for rules that require type information. For example, the 'strict-boolean-expressions' rule ensures that boolean expressions are clear and error-free by considering the types involved in the expression.

/* eslint @typescript-eslint/strict-boolean-expressions: 'error' */
function isTruthy(value: any): boolean {
  return Boolean(value);
}

Code style enforcement

Enforces naming conventions for everything from variables to type parameters. This example enforces camelCase naming for variables.

/* eslint @typescript-eslint/naming-convention: ['error', { 'selector': 'variable', 'format': ['camelCase'] }] */
let myVariable = 1;

Accessibility checks

This feature requires functions and methods to explicitly define their return type to improve code readability and maintainability.

/* eslint @typescript-eslint/explicit-function-return-type: 'warn' */
function add(x: number, y: number) {
  return x + y;
}

Other packages similar to @typescript-eslint/eslint-plugin

Keywords

FAQs

Package last updated on 10 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with āš”ļø by Socket Inc